package com.kexio.core.web;

import com.kexio.core.properties.CoreProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Web模块自动配置
 * 
 * @author Kexio Team
 * @since 1.0.0
 */
@Configuration
@ComponentScan(basePackages = {
    "com.kexio.core.web.config",
    "com.kexio.core.web.exception", 
    "com.kexio.core.web.interceptor"
})
@EnableConfigurationProperties(CoreProperties.class)
@ConditionalOnProperty(prefix = "kexio.core.web", name = "enabled", havingValue = "true", matchIfMissing = true)
public class WebAutoConfiguration {
    
    private static final Logger log = LoggerFactory.getLogger(WebAutoConfiguration.class);
    
    public WebAutoConfiguration() {
        log.info("==> Kexio Core Web模块已启用");
    }
}
